package com.stlm2.dems.entity;

/**
 * Created by ZLQ on 2017/9/4.
 */
public enum CommentsProperty {

    newComments(1) {
        public String toString() {
            return "全部评价";
        }
    },
    Blueprinting(2) {
        public String toString() {
            return "晒图";
        }
    },
    GoodComments(3) {
        public String toString() {
            return "好评";
        }
    },
    NegativeComments(4) {
        public String toString() {
            return "差评";
        }
    },
    ZhongCustomers(5) {
        public String toString() {
            return "中评";
        }
    };
    private final int val;

    CommentsProperty(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static CommentsProperty getByIntValue(int n) {
        switch (n) {
            case 1:
                return  newComments;
            case 2:
                return Blueprinting;
            case 3:
                return GoodComments;
            case 4:
                return NegativeComments;
            case 5:
                return ZhongCustomers;

            default:
                return null;
        }
    }
}
